import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
var _excluded = ["className", "type", "title", "description", "extra", "actions"];
import React from 'react';
import classNames from 'classnames';
import { Icon } from 'antd';
import styles from "./index.less?modules";
export default function Result(_ref) {
  var className = _ref.className,
      type = _ref.type,
      title = _ref.title,
      description = _ref.description,
      extra = _ref.extra,
      actions = _ref.actions,
      restProps = _objectWithoutProperties(_ref, _excluded);

  var iconMap = {
    error: /*#__PURE__*/React.createElement(Icon, {
      className: styles.error,
      type: "close-circle"
    }),
    success: /*#__PURE__*/React.createElement(Icon, {
      className: styles.success,
      type: "check-circle"
    })
  };
  var clsString = classNames(styles.result, className);
  return /*#__PURE__*/React.createElement("div", Object.assign({
    className: clsString
  }, restProps), /*#__PURE__*/React.createElement("div", {
    className: styles.icon
  }, iconMap[type]), /*#__PURE__*/React.createElement("div", {
    className: styles.title
  }, title), description && /*#__PURE__*/React.createElement("div", {
    className: styles.description
  }, description), extra && /*#__PURE__*/React.createElement("div", {
    className: styles.extra
  }, extra), actions && /*#__PURE__*/React.createElement("div", {
    className: styles.actions
  }, actions));
}